/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class FreshAirUnit {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010030005';
    }

    get categoryName() {
        return '\u65b0\u98ce\u673a\u7ec4';
    }

    getAirTemperature(params) {
        return command({
            method: 'getAirTemperature',
            methodId: 'pGoxHGuV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHumidity(params) {
        return command({
            method: 'getHumidity',
            methodId: 'pDrhFbiG',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'pZgRT3mS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pgh0mqtx',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'p1vFjx23',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAirTemperature(params) {
        return command({
            method: 'setAirTemperature',
            methodId: 'ppAXIO3Z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'pUPQ8jrL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH3nf1d',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default FreshAirUnit;
